package com.sd.repay.service;

import com.sd.repay.pojo.ScheduleJob;

import java.util.List;

/**
 * @author sd
 * @Description: 定时任务管理Service接口
 * @date 2017年10月25日
 */
public interface JobTaskService {

    List<ScheduleJob> getAllTask() throws Exception;

    ScheduleJob getTaskById(String jobId) throws Exception;

    int addTask(ScheduleJob scheduleJob) throws Exception;

    void updateStatus(String jobId, String jobStatus) throws Exception;

    void updateCron(String jobId, String cron) throws Exception;

    void updateWarnTime(String jobId, String warnTime) throws Exception;

    void addJob(ScheduleJob job) throws Exception;

    void pauseJob(ScheduleJob scheduleJob) throws Exception;

    void resumeJob(ScheduleJob scheduleJob) throws Exception;

    void deleteJob(ScheduleJob scheduleJob) throws Exception;

    void runAJobNow(ScheduleJob scheduleJob) throws Exception;

    void stopJob(ScheduleJob scheduleJob) throws Exception;
}
